package com.jc.task.guavaretry;

import com.google.common.base.Preconditions;

import java.text.SimpleDateFormat;

/**
 * Description
 * Created by jay on 2017/6/16.
 */
public class guavaPreconditions {

    private static SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss,SSS");

    public static void main(String[] args) throws Exception {
        insert("2",3);

    }

    public static void insert(String name, int age) {
        Preconditions.checkNotNull(name);
        Preconditions.checkArgument(!name.equals(""));
        Preconditions.checkArgument(age >= 0);
    }
}
